package Login;

import java.awt.CardLayout;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.UIManager;


public class MainFrame extends JFrame {
	
	private JPanel cards;
	private CardLayout cl;
	private MainPane mainPane;
	private ModePane modePane;
	private JFrame frame;
	
	public MainFrame(){
		cards=new JPanel(cl=new CardLayout());
		mainPane = new MainPane(cards, 1, cl);
		createFrame();
		modePane = new ModePane(cards, 2, cl, frame);
		cards.add(mainPane, "1");
		cards.add(modePane, "2" );
		
	}
	
	public void createFrame(){
		
		frame = new JFrame("NiSoft");
		frame.add(cards);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setSize(cards.getPreferredSize());
		frame.setLocationRelativeTo(null);
	 	
	}

	public static void main(String[] args){
		new MainFrame();
		try{
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception ex){}
	}
}
